Today, security plays an important role in many electronic devices and computing environments. This is especially the case for high-security devices for payment applications and E-government applications. Examples of such devices are secure elements embedded in mobile phones, smart cards, and passports or identity cards. A secure element may for example be an embedded chip, more specifically a tamper-resistant integrated circuit with installed or pre-installed smart-card-grade applications, for instance payment applications, which have a prescribed functionality and a prescribed level of security. Furthermore, a secure element may implement security functions, such as cryptographic functions and authentication functions. Also in the Internet-of-Things and in automotive applications the demand for secure solutions is increasing. Thus, secure elements may be used in these areas as well. There is a need to protect such devices against various attacks. Also, other kinds of chips, or larger devices which contain multiple chips such as processor modules and co-processor modules, may need to be protected against attacks.